{include file="common/head"/} 
<form action="{:url('admin/order/delorderlist')}" method="get">
    <div class="admin-main">
        <fieldset class="layui-elem-field layui-field-title"><legend>全部订单{:lang('list')}</legend></fieldset>
        <div class="demoTable layui-form"> 
            <div class="layui-inline">
                <select name="shopid" ng-model="field.shopid" lay-filter="shopid" lay-verify="required">
                    <option value="">请选择所属商户</option>
                    {volist name="shoplist" id="vo"}<option value="{$vo.id}">{$vo.name}</option>  {/volist}
                </select> 
            </div> 
           <!--  <div class="layui-inline">
                <select name="state"  ng-model="field.state" lay-filter="state" lay-verify="required">
                    <option value="">按支付状态</option>
                    <option value="0">待支付</option>
                    <option value="1">待确认</option>
                    <option value="2">已确认</option> 
                </select>
            </div> -->
            <div class="layui-inline"> 
                <input type="text" id="timess" name="timess" class="layui-input"placeholder="选择日期"> 
            </div>
            <div class="layui-inline">
                <input class="layui-input" name="orderid"  placeholder="平台订单号">
            </div>
            <div class="layui-inline">
                <input class="layui-input" name="orderid_out"  placeholder="商户订单号">
            </div>
            <input class="layui-btn layui-btn-primary"  type="submit" value="删除" onclick="return window.confirm('删除后不可恢复！');">
        </div>
        </form>
        <table class="layui-table layui-hide" id="orderlist" lay-filter="listss"></table>
    </div> 

<script src="/static/plugins/layui/layui.js"></script> 
<script>
   
    layui.use(['layer','table','form','laydate'], function() {
        var table = layui.table,form = layui.form, $ = layui.jquery, layer = layui.layer,laydate = layui.laydate;;
        laydate.render({
            elem: '#timess',range: true
        });

        // layer.confirm('您是如何看待前端开发？', {
        //   btn: ['重要','奇葩'] 
        // }, function(){
        //   layer.msg('的确很重要', {icon: 1});
        // })

        tableIn = table.render({
            id: 'listss',
            elem: '#orderlist',
			toolbar: '#topNav',
            url: '{:url("delorderlist")}',
            method: 'post', 
            page: true,
            cols: [[ 
                {field: 'orderid', title: '平台订单号',align: 'center', width:138, fixed: true},
                {field: 'orderid_out', title: '商户订单号',align: 'center', width:138, fixed: true},
                {field: 'cionname', title: '币种名称',align: 'center', width: 120, fixed: true},
                {field: 'money', title: '订单金额',align: 'center', width: 120, fixed: true}, 
                {field: 'state_name', title: '订单状态',align: 'center', width: 90}, 
                {field: 'payname', title: '支付信息',align: 'center', width: 100,templet: '#payinfo'},   
                // {field: 'channelname', title: '所属通道',align: 'center', width: 120}, 
                // {field: 'username', title: '所属码商',align: 'center', width: 100},  
                {field: 'shopname', title: '所属商户',align: 'center', width: 120,templet: '#shopinfo'}, 
                {field: 'addtime', title: '提交时间',align: 'center', width: 169},   
            ]],
            limit: 60 //每页默认显示的数量
        });  
        //搜索
        $('#search').on('click', function() {
            var shopid = $('#shopid').val();
            var timess = $('#timess').val();
            var state = $('#state').val();
            var orderid = $('#orderid').val();
            var orderidout = $('#orderid_out').val();
            if($.trim(shopid)===''  && $.trim(timess)==='' && $.trim(orderid)==='' && $.trim(orderidout)==='' && $.trim(state)==='' ) {
                layer.msg('请选择删除的订单类型！',{icon:0});
                return;
            }else{
                tableIn.reload({ page: {page: 1},where: {shopid: shopid,channelid: channelid,timess: timess,orderid: orderid,orderidout: orderidout,state: state,points: points}});
            } 
        });
        // form.on('select(shopid)', function (data) {
        //     var shopid = data.value;
        //     $.get("{:url('channel/getChannel')}?shopid=" + shopid, function (data) {
        //         var html = '<option value="">请选择通道</option>';
        //         $.each(data, function (i, value) {
        //             html += '<option value="' + value.id + '">' + value.title + '</option>';
        //         });
        //         $('#channelid').html(html); 
        //         form.render()
        //     });
        // });     
    });
    function orderquan(timessss){
        tableIn.reload({ page: {page: 1},where: {timequan:timessss}}); 
    }

    // $(function(){
    //     $("#btn").click(function(){
    //         return confirm("是否确认删除");
    //     });
    // });
    function no_del()
    {
        if(confirm("确定删除吗?")){
    　　     return true; 
        }else{
            return false;
        }

    }
</script>
</body>
</html>